package com.arnold.www.create;

import java.util.Timer;
import java.util.TimerTask;

/**
 * @ClassName CreateThread_timer
 * @Description: 定时器执行计时器
 * @Author Arnold
 * @Date 2020/4/8
 * @Version V2.0
 **/
public class CreateThread_timer {
    public static void main(String[] args) {
        Timer timer = new Timer();
        timer.schedule(new TimerTask() {
            @Override
            public void run() {
                System.out.println("定时执行任务了！！！");
            }
        },0, 1000);

    }
}